﻿#region <!-- Using Directives -->

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

#endregion

namespace WordSharpDev.Extensions
{
	internal static class RegexExtensions
	{
		#region <!-- IsLikeFull -->

		public static Boolean IsLikeFull(this String p_This, String p_Pattern)
		{
			if (p_This == null) return false;

			var l_Regex = new Regex("^" + p_Pattern + "$", RegexOptions.IgnoreCase);

			return l_Regex.IsMatch(p_This);
		}

		#endregion

		#region <!-- IsLikePartial -->

		public static Boolean IsLikePartial(this String p_This, String p_Pattern)
		{
			if (p_This == null) return false;

			var l_Regex = new Regex(p_Pattern, RegexOptions.IgnoreCase);

			return l_Regex.IsMatch(p_This);
		}

		#endregion
	}
}